Repository navigation
Write an optional head-average safety factor into VOP files - #53
Merged
Merged
Conversation
pypulseqpp reads global_safety_factor from a VOP file's metadata and multiplies every head-average SAR by it. The writer and the vops command take it with its basis line; a file without it gives head-average SAR a factor of 1. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01MFB6QLPkuY13FdsMg5RBpE
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this changes
vop.writeandmariepy vopstake an optionalglobal_safety_factor(at least 1) together with itsglobal_safety_basisline, and write both into the file's metadata. A file written without them carries neither key, so head-average SAR gets a factor of 1.PLAN.md's VOP-file table lists the two keys.Why
pypulseqpp's
check_sar(#215, 0.0.56) multiplies every head-average SAR by the file'sglobal_safety_factor, the same waysafety_factormultiplies local SAR. Until now mariepy could write only the local factor.How it was verified
The 347 skips are the CUDA legs; this machine has no CUDA device.
New tests:
test_the_global_safety_factor_reads_back_and_is_absent_unless_giventest_a_global_safety_factor_below_one_is_refusedtest_a_global_safety_factor_without_a_basis_is_refusedtest_a_global_safety_basis_without_its_factor_is_refusedtest_vops_writes_the_global_safety_factor_it_is_givenChecklist
bash scripts/format_and_lint.shis cleanpytest -qpasses, and new behaviour has a test whose name states the invariant it protects@pytest.mark.cudaand skips cleanly (thevoptests use thedevicefixture)Generated by Claude Code